package com.uncp.comisiondeadmision.service;

import java.sql.SQLException;
import java.util.List;

import com.uncp.comisiondeadmision.dao.DAOFactory;
import com.uncp.comisiondeadmision.dao.IDCarnet;
import com.uncp.comisiondeadmision.util.entity.ECarnet;
import com.uncp.comisiondeadmision.util.entity.EPostulante;

public class SCarnet implements ISCarnet{
	
	private DAOFactory daoFactory = null;
	private IDCarnet carnetDAO;

	public SCarnet(int i) {
		daoFactory = DAOFactory.getDAOFactory(i);
		this.carnetDAO = daoFactory.getCarnet();
	}
	
	public List<EPostulante> listaPostulantesPorEstados(String estadoPostu,String estadoSolic) throws Exception {
		return carnetDAO.listaPostulantesPorEstados(estadoPostu,estadoSolic);
	}

	public Integer insertarCarnet(ECarnet entidad) throws SQLException {
		return carnetDAO.insertarCarnet(entidad);
	}

}
